﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:wp="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:b="clr-namespace:PillBox.Client"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    x:Class="PillBox.Client.Views.PersonChoiceView"
    mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="400"
	d:DataContext="{d:DesignData ../SampleData/PersonChoiceViewModelSampleData.xaml}">
    <HyperlinkButton x:Name="Open" Style="{StaticResource Phone_TiltingButtonBase}">
        <Grid Height="82">
        	<Grid.ColumnDefinitions>
        		<ColumnDefinition Width="10"/>
        		<ColumnDefinition Width="Auto"/>
        		<ColumnDefinition/>
        	</Grid.ColumnDefinitions>
    		<Rectangle 
    			Fill="{Binding Person.ColorBand}" 
    			Margin="0"
                StrokeThickness="5"
                Height="75"/>
            <Image
                Source="{Binding Person.FullSizeImageUri}"
                Height="75"
                Width="75"
        		VerticalAlignment="Center"
                HorizontalAlignment="Right"
                Grid.Column="1"/>
			<Grid Grid.Column="2" Margin="16,0,0,0">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="*" />
				</Grid.RowDefinitions>				
				<TextBlock Margin="0,-5,1,-5" TextWrapping="Wrap" Text="{Binding Person.Name}" Style="{StaticResource PhoneTextExtraLargeStyle}" d:LayoutOverrides="Width"/>
				<TextBlock Margin="0,-5,1,0" TextWrapping="Wrap" Text="{Binding Person.Role}" Style="{StaticResource PhoneTextSubtleStyle}" VerticalAlignment="Top" d:LayoutOverrides="Width" Grid.Row="1"/>				
			</Grid>
    	</Grid>
    </HyperlinkButton>
</UserControl>